
package com.ccc.scala.base8_match

object Match07 {
  def main(args: Array[String]): Unit = {
    // 匹配应用

    // 变量声明
    val (id, name, age) = (1, "cj", 24)
    println(s"id: $id, name: $name, age: $age") // id: 1, name: cj, age: 24

    val Array(first, second, _*) = Array(1, 7, 2, 9)
    println(s"first=$first, second=$second") // first=1, second=7

  }


}
